package com.leung.controller;


import com.leung.domain.entity.DeviceConfig;
import com.leung.domain.messageEntity.MqMessage;
import com.leung.feignClient.TcpWebClient;
import com.leung.publisher.MessagePublisher;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author 丨一
 * @version 1.0
 * @title TestController
 * @description:
 * @date 2025/3/5 上午11:24
 */
@RestController
@RequestMapping("/web")
public class TestController {

    @Resource
    private TcpWebClient tcpWebClient;

    @Resource
    private MessagePublisher messagePublisher;

    @GetMapping
    public void testSend() {
        tcpWebClient.sendStr();
    }

    @PostMapping
    public void testMq(@RequestBody MqMessage<DeviceConfig> mqMessage) {
        messagePublisher.send2TcpWebService(mqMessage);
    }
    
}
